package com.wangsd.core.util;

public class AccuracyCalculation {

	public static Double calculation(Double num1,Double num2) {		
  	   int baseNum = 0;
  	   baseNum += num1.toString().replace(".", "/").split("/")[1].length();
       baseNum += num2.toString().replace(".", "/").split("/")[1].length();
  	   Double amount= Integer.valueOf(num1.toString().replace(".", "")) * Integer.valueOf(num2.toString().replace(".", "")) / Math.pow(10, baseNum);               	
  	   return amount;
	}
	
	public static void main(String[] args) {
		Double num1=Double.valueOf("23");
		Double num2=0.6;
        System.out.println(calculation(num1,num2));
	}
}
